<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - coverage_clean.info - 13/bits/basic_string.tcc</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="title">LCOV - code coverage report</td></tr>
            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

            <tr>
              <td width="100%">
                <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="10%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">13/bits</a> - basic_string.tcc<span style="font-size: 80%;"> (source / <a href="basic_string.tcc.func-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="5%"></td>
            <td width="5%" class="headerCovTableHead">Coverage</td>
            <td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
            <td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">coverage_clean.info</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntryHi">100.0&nbsp;%</td>
            <td class="headerCovTableEntry">34</td>
            <td class="headerCovTableEntry">34</td>
          </tr>
          <tr>
            <td class="headerItem">Test Date:</td>
            <td class="headerValue">2025-11-25 04:45:29</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntryLo">66.7&nbsp;%</td>
            <td class="headerCovTableEntry">9</td>
            <td class="headerCovTableEntry">6</td>
          </tr>
                  <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
                </table>
              </td>
            </tr>

            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
          </table>

          <table cellpadding=0 cellspacing=0 border=0>
            <tr>
              <td><br></td>
            </tr>
            <tr>
              <td>
<pre class="sourceHeading">            Line data    Source code</pre>
<pre class="source">
<span id="L1"><span class="lineNum">       1</span>              : // Components for manipulating sequences of characters -*- C++ -*-</span>
<span id="L2"><span class="lineNum">       2</span>              : </span>
<span id="L3"><span class="lineNum">       3</span>              : // Copyright (C) 1997-2023 Free Software Foundation, Inc.</span>
<span id="L4"><span class="lineNum">       4</span>              : //</span>
<span id="L5"><span class="lineNum">       5</span>              : // This file is part of the GNU ISO C++ Library.  This library is free</span>
<span id="L6"><span class="lineNum">       6</span>              : // software; you can redistribute it and/or modify it under the</span>
<span id="L7"><span class="lineNum">       7</span>              : // terms of the GNU General Public License as published by the</span>
<span id="L8"><span class="lineNum">       8</span>              : // Free Software Foundation; either version 3, or (at your option)</span>
<span id="L9"><span class="lineNum">       9</span>              : // any later version.</span>
<span id="L10"><span class="lineNum">      10</span>              : </span>
<span id="L11"><span class="lineNum">      11</span>              : // This library is distributed in the hope that it will be useful,</span>
<span id="L12"><span class="lineNum">      12</span>              : // but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span id="L13"><span class="lineNum">      13</span>              : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<span id="L14"><span class="lineNum">      14</span>              : // GNU General Public License for more details.</span>
<span id="L15"><span class="lineNum">      15</span>              : </span>
<span id="L16"><span class="lineNum">      16</span>              : // Under Section 7 of GPL version 3, you are granted additional</span>
<span id="L17"><span class="lineNum">      17</span>              : // permissions described in the GCC Runtime Library Exception, version</span>
<span id="L18"><span class="lineNum">      18</span>              : // 3.1, as published by the Free Software Foundation.</span>
<span id="L19"><span class="lineNum">      19</span>              : </span>
<span id="L20"><span class="lineNum">      20</span>              : // You should have received a copy of the GNU General Public License and</span>
<span id="L21"><span class="lineNum">      21</span>              : // a copy of the GCC Runtime Library Exception along with this program;</span>
<span id="L22"><span class="lineNum">      22</span>              : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see</span>
<span id="L23"><span class="lineNum">      23</span>              : // &lt;http://www.gnu.org/licenses/&gt;.</span>
<span id="L24"><span class="lineNum">      24</span>              : </span>
<span id="L25"><span class="lineNum">      25</span>              : /** @file bits/basic_string.tcc</span>
<span id="L26"><span class="lineNum">      26</span>              :  *  This is an internal header file, included by other library headers.</span>
<span id="L27"><span class="lineNum">      27</span>              :  *  Do not attempt to use it directly. @headername{string}</span>
<span id="L28"><span class="lineNum">      28</span>              :  */</span>
<span id="L29"><span class="lineNum">      29</span>              : </span>
<span id="L30"><span class="lineNum">      30</span>              : //</span>
<span id="L31"><span class="lineNum">      31</span>              : // ISO C++ 14882: 21  Strings library</span>
<span id="L32"><span class="lineNum">      32</span>              : //</span>
<span id="L33"><span class="lineNum">      33</span>              : </span>
<span id="L34"><span class="lineNum">      34</span>              : // Written by Jason Merrill based upon the specification by Takanori Adachi</span>
<span id="L35"><span class="lineNum">      35</span>              : // in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers to ISO-14882.</span>
<span id="L36"><span class="lineNum">      36</span>              : // Non-reference-counted implementation written by Paolo Carlini and</span>
<span id="L37"><span class="lineNum">      37</span>              : // updated by Jonathan Wakely for ISO-14882-2011.</span>
<span id="L38"><span class="lineNum">      38</span>              : </span>
<span id="L39"><span class="lineNum">      39</span>              : #ifndef _BASIC_STRING_TCC</span>
<span id="L40"><span class="lineNum">      40</span>              : #define _BASIC_STRING_TCC 1</span>
<span id="L41"><span class="lineNum">      41</span>              : </span>
<span id="L42"><span class="lineNum">      42</span>              : #pragma GCC system_header</span>
<span id="L43"><span class="lineNum">      43</span>              : </span>
<span id="L44"><span class="lineNum">      44</span>              : #include &lt;bits/cxxabi_forced.h&gt;</span>
<span id="L45"><span class="lineNum">      45</span>              : </span>
<span id="L46"><span class="lineNum">      46</span>              : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L47"><span class="lineNum">      47</span>              : {</span>
<span id="L48"><span class="lineNum">      48</span>              : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L49"><span class="lineNum">      49</span>              : </span>
<span id="L50"><span class="lineNum">      50</span>              : #if _GLIBCXX_USE_CXX11_ABI</span>
<span id="L51"><span class="lineNum">      51</span>              : </span>
<span id="L52"><span class="lineNum">      52</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L53"><span class="lineNum">      53</span>              :     const typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L54"><span class="lineNum">      54</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::npos;</span>
<span id="L55"><span class="lineNum">      55</span>              : </span>
<span id="L56"><span class="lineNum">      56</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L57"><span class="lineNum">      57</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L58"><span class="lineNum">      58</span>              :     void</span>
<span id="L59"><span class="lineNum">      59</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L60"><span class="lineNum">      60</span>              :     swap(basic_string&amp; __s) _GLIBCXX_NOEXCEPT</span>
<span id="L61"><span class="lineNum">      61</span>              :     {</span>
<span id="L62"><span class="lineNum">      62</span>              :       if (this == std::__addressof(__s))</span>
<span id="L63"><span class="lineNum">      63</span>              :         return;</span>
<span id="L64"><span class="lineNum">      64</span>              : </span>
<span id="L65"><span class="lineNum">      65</span>              :       _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator());</span>
<span id="L66"><span class="lineNum">      66</span>              : </span>
<span id="L67"><span class="lineNum">      67</span>              :       if (_M_is_local())</span>
<span id="L68"><span class="lineNum">      68</span>              :         if (__s._M_is_local())</span>
<span id="L69"><span class="lineNum">      69</span>              :           {</span>
<span id="L70"><span class="lineNum">      70</span>              :             if (length() &amp;&amp; __s.length())</span>
<span id="L71"><span class="lineNum">      71</span>              :               {</span>
<span id="L72"><span class="lineNum">      72</span>              :                 _CharT __tmp_data[_S_local_capacity + 1];</span>
<span id="L73"><span class="lineNum">      73</span>              :                 traits_type::copy(__tmp_data, __s._M_local_buf,</span>
<span id="L74"><span class="lineNum">      74</span>              :                                   __s.length() + 1);</span>
<span id="L75"><span class="lineNum">      75</span>              :                 traits_type::copy(__s._M_local_buf, _M_local_buf,</span>
<span id="L76"><span class="lineNum">      76</span>              :                                   length() + 1);</span>
<span id="L77"><span class="lineNum">      77</span>              :                 traits_type::copy(_M_local_buf, __tmp_data,</span>
<span id="L78"><span class="lineNum">      78</span>              :                                   __s.length() + 1);</span>
<span id="L79"><span class="lineNum">      79</span>              :               }</span>
<span id="L80"><span class="lineNum">      80</span>              :             else if (__s.length())</span>
<span id="L81"><span class="lineNum">      81</span>              :               {</span>
<span id="L82"><span class="lineNum">      82</span>              :                 _M_init_local_buf();</span>
<span id="L83"><span class="lineNum">      83</span>              :                 traits_type::copy(_M_local_buf, __s._M_local_buf,</span>
<span id="L84"><span class="lineNum">      84</span>              :                                   __s.length() + 1);</span>
<span id="L85"><span class="lineNum">      85</span>              :                 _M_length(__s.length());</span>
<span id="L86"><span class="lineNum">      86</span>              :                 __s._M_set_length(0);</span>
<span id="L87"><span class="lineNum">      87</span>              :                 return;</span>
<span id="L88"><span class="lineNum">      88</span>              :               }</span>
<span id="L89"><span class="lineNum">      89</span>              :             else if (length())</span>
<span id="L90"><span class="lineNum">      90</span>              :               {</span>
<span id="L91"><span class="lineNum">      91</span>              :                 __s._M_init_local_buf();</span>
<span id="L92"><span class="lineNum">      92</span>              :                 traits_type::copy(__s._M_local_buf, _M_local_buf,</span>
<span id="L93"><span class="lineNum">      93</span>              :                                   length() + 1);</span>
<span id="L94"><span class="lineNum">      94</span>              :                 __s._M_length(length());</span>
<span id="L95"><span class="lineNum">      95</span>              :                 _M_set_length(0);</span>
<span id="L96"><span class="lineNum">      96</span>              :                 return;</span>
<span id="L97"><span class="lineNum">      97</span>              :               }</span>
<span id="L98"><span class="lineNum">      98</span>              :           }</span>
<span id="L99"><span class="lineNum">      99</span>              :         else</span>
<span id="L100"><span class="lineNum">     100</span>              :           {</span>
<span id="L101"><span class="lineNum">     101</span>              :             const size_type __tmp_capacity = __s._M_allocated_capacity;</span>
<span id="L102"><span class="lineNum">     102</span>              :             __s._M_init_local_buf();</span>
<span id="L103"><span class="lineNum">     103</span>              :             traits_type::copy(__s._M_local_buf, _M_local_buf,</span>
<span id="L104"><span class="lineNum">     104</span>              :                               length() + 1);</span>
<span id="L105"><span class="lineNum">     105</span>              :             _M_data(__s._M_data());</span>
<span id="L106"><span class="lineNum">     106</span>              :             __s._M_data(__s._M_local_buf);</span>
<span id="L107"><span class="lineNum">     107</span>              :             _M_capacity(__tmp_capacity);</span>
<span id="L108"><span class="lineNum">     108</span>              :           }</span>
<span id="L109"><span class="lineNum">     109</span>              :       else</span>
<span id="L110"><span class="lineNum">     110</span>              :         {</span>
<span id="L111"><span class="lineNum">     111</span>              :           const size_type __tmp_capacity = _M_allocated_capacity;</span>
<span id="L112"><span class="lineNum">     112</span>              :           if (__s._M_is_local())</span>
<span id="L113"><span class="lineNum">     113</span>              :             {</span>
<span id="L114"><span class="lineNum">     114</span>              :               _M_init_local_buf();</span>
<span id="L115"><span class="lineNum">     115</span>              :               traits_type::copy(_M_local_buf, __s._M_local_buf,</span>
<span id="L116"><span class="lineNum">     116</span>              :                                 __s.length() + 1);</span>
<span id="L117"><span class="lineNum">     117</span>              :               __s._M_data(_M_data());</span>
<span id="L118"><span class="lineNum">     118</span>              :               _M_data(_M_local_buf);</span>
<span id="L119"><span class="lineNum">     119</span>              :             }</span>
<span id="L120"><span class="lineNum">     120</span>              :           else</span>
<span id="L121"><span class="lineNum">     121</span>              :             {</span>
<span id="L122"><span class="lineNum">     122</span>              :               pointer __tmp_ptr = _M_data();</span>
<span id="L123"><span class="lineNum">     123</span>              :               _M_data(__s._M_data());</span>
<span id="L124"><span class="lineNum">     124</span>              :               __s._M_data(__tmp_ptr);</span>
<span id="L125"><span class="lineNum">     125</span>              :               _M_capacity(__s._M_allocated_capacity);</span>
<span id="L126"><span class="lineNum">     126</span>              :             }</span>
<span id="L127"><span class="lineNum">     127</span>              :           __s._M_capacity(__tmp_capacity);</span>
<span id="L128"><span class="lineNum">     128</span>              :         }</span>
<span id="L129"><span class="lineNum">     129</span>              : </span>
<span id="L130"><span class="lineNum">     130</span>              :       const size_type __tmp_length = length();</span>
<span id="L131"><span class="lineNum">     131</span>              :       _M_length(__s.length());</span>
<span id="L132"><span class="lineNum">     132</span>              :       __s._M_length(__tmp_length);</span>
<span id="L133"><span class="lineNum">     133</span>              :     }</span>
<span id="L134"><span class="lineNum">     134</span>              : </span>
<span id="L135"><span class="lineNum">     135</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L136"><span class="lineNum">     136</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L137"><span class="lineNum">     137</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::pointer</span>
<span id="L138"><span class="lineNum">     138</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L139"><span class="lineNum">     139</span>              :     _M_create(size_type&amp; __capacity, size_type __old_capacity)</span>
<span id="L140"><span class="lineNum">     140</span>              :     {</span>
<span id="L141"><span class="lineNum">     141</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L142"><span class="lineNum">     142</span>              :       // 83.  String::npos vs. string::max_size()</span>
<span id="L143"><span class="lineNum">     143</span>              :       if (__capacity &gt; max_size())</span>
<span id="L144"><span class="lineNum">     144</span>              :         std::__throw_length_error(__N(&quot;basic_string::_M_create&quot;));</span>
<span id="L145"><span class="lineNum">     145</span>              : </span>
<span id="L146"><span class="lineNum">     146</span>              :       // The below implements an exponential growth policy, necessary to</span>
<span id="L147"><span class="lineNum">     147</span>              :       // meet amortized linear time requirements of the library: see</span>
<span id="L148"><span class="lineNum">     148</span>              :       // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.</span>
<span id="L149"><span class="lineNum">     149</span>              :       if (__capacity &gt; __old_capacity &amp;&amp; __capacity &lt; 2 * __old_capacity)</span>
<span id="L150"><span class="lineNum">     150</span>              :         {</span>
<span id="L151"><span class="lineNum">     151</span>              :           __capacity = 2 * __old_capacity;</span>
<span id="L152"><span class="lineNum">     152</span>              :           // Never allocate a string bigger than max_size.</span>
<span id="L153"><span class="lineNum">     153</span>              :           if (__capacity &gt; max_size())</span>
<span id="L154"><span class="lineNum">     154</span>              :             __capacity = max_size();</span>
<span id="L155"><span class="lineNum">     155</span>              :         }</span>
<span id="L156"><span class="lineNum">     156</span>              : </span>
<span id="L157"><span class="lineNum">     157</span>              :       // NB: Need an array of char_type[__capacity], plus a terminating</span>
<span id="L158"><span class="lineNum">     158</span>              :       // null char_type() element.</span>
<span id="L159"><span class="lineNum">     159</span>              :       return _S_allocate(_M_get_allocator(), __capacity + 1);</span>
<span id="L160"><span class="lineNum">     160</span>              :     }</span>
<span id="L161"><span class="lineNum">     161</span>              : </span>
<span id="L162"><span class="lineNum">     162</span>              :   // NB: This is the special case for Input Iterators, used in</span>
<span id="L163"><span class="lineNum">     163</span>              :   // istreambuf_iterators, etc.</span>
<span id="L164"><span class="lineNum">     164</span>              :   // Input Iterators have a cost structure very different from</span>
<span id="L165"><span class="lineNum">     165</span>              :   // pointers, calling for a different coding style.</span>
<span id="L166"><span class="lineNum">     166</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L167"><span class="lineNum">     167</span>              :     template&lt;typename _InIterator&gt;</span>
<span id="L168"><span class="lineNum">     168</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L169"><span class="lineNum">     169</span>              :       void</span>
<span id="L170"><span class="lineNum">     170</span> <span class="tlaGNC tlaBgGNC">           2 :       basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span></span>
<span id="L171"><span class="lineNum">     171</span>              :       _M_construct(_InIterator __beg, _InIterator __end,</span>
<span id="L172"><span class="lineNum">     172</span>              :                    std::input_iterator_tag)</span>
<span id="L173"><span class="lineNum">     173</span>              :       {</span>
<span id="L174"><span class="lineNum">     174</span> <span class="tlaGNC">           2 :         size_type __len = 0;</span></span>
<span id="L175"><span class="lineNum">     175</span> <span class="tlaGNC">           2 :         size_type __capacity = size_type(_S_local_capacity);</span></span>
<span id="L176"><span class="lineNum">     176</span>              : </span>
<span id="L177"><span class="lineNum">     177</span>              :         _M_init_local_buf();</span>
<span id="L178"><span class="lineNum">     178</span>              : </span>
<span id="L179"><span class="lineNum">     179</span> <span class="tlaGNC">          32 :         while (__beg != __end &amp;&amp; __len &lt; __capacity)</span></span>
<span id="L180"><span class="lineNum">     180</span>              :           {</span>
<span id="L181"><span class="lineNum">     181</span> <span class="tlaGNC">          30 :             _M_local_buf[__len++] = *__beg;</span></span>
<span id="L182"><span class="lineNum">     182</span> <span class="tlaGNC">          30 :             ++__beg;</span></span>
<span id="L183"><span class="lineNum">     183</span>              :           }</span>
<span id="L184"><span class="lineNum">     184</span>              : </span>
<span id="L185"><span class="lineNum">     185</span>              :         struct _Guard</span>
<span id="L186"><span class="lineNum">     186</span>              :         {</span>
<span id="L187"><span class="lineNum">     187</span>              :           _GLIBCXX20_CONSTEXPR</span>
<span id="L188"><span class="lineNum">     188</span> <span class="tlaGNC">           2 :           explicit _Guard(basic_string* __s) : _M_guarded(__s) { }</span></span>
<span id="L189"><span class="lineNum">     189</span>              : </span>
<span id="L190"><span class="lineNum">     190</span>              :           _GLIBCXX20_CONSTEXPR</span>
<span id="L191"><span class="lineNum">     191</span> <span class="tlaGNC">           2 :           ~_Guard() { if (_M_guarded) _M_guarded-&gt;_M_dispose(); }</span></span>
<span id="L192"><span class="lineNum">     192</span>              : </span>
<span id="L193"><span class="lineNum">     193</span>              :           basic_string* _M_guarded;</span>
<span id="L194"><span class="lineNum">     194</span> <span class="tlaGNC">           2 :         } __guard(this);</span></span>
<span id="L195"><span class="lineNum">     195</span>              : </span>
<span id="L196"><span class="lineNum">     196</span> <span class="tlaGNC">        2937 :         while (__beg != __end)</span></span>
<span id="L197"><span class="lineNum">     197</span>              :           {</span>
<span id="L198"><span class="lineNum">     198</span> <span class="tlaGNC">        2935 :             if (__len == __capacity)</span></span>
<span id="L199"><span class="lineNum">     199</span>              :               {</span>
<span id="L200"><span class="lineNum">     200</span>              :                 // Allocate more space.</span>
<span id="L201"><span class="lineNum">     201</span> <span class="tlaGNC">          15 :                 __capacity = __len + 1;</span></span>
<span id="L202"><span class="lineNum">     202</span> <span class="tlaGNC">          15 :                 pointer __another = _M_create(__capacity, __len);</span></span>
<span id="L203"><span class="lineNum">     203</span> <span class="tlaGNC">          15 :                 this-&gt;_S_copy(__another, _M_data(), __len);</span></span>
<span id="L204"><span class="lineNum">     204</span> <span class="tlaGNC">          15 :                 _M_dispose();</span></span>
<span id="L205"><span class="lineNum">     205</span> <span class="tlaGNC">          15 :                 _M_data(__another);</span></span>
<span id="L206"><span class="lineNum">     206</span> <span class="tlaGNC">          15 :                 _M_capacity(__capacity);</span></span>
<span id="L207"><span class="lineNum">     207</span>              :               }</span>
<span id="L208"><span class="lineNum">     208</span> <span class="tlaGNC">        2935 :             traits_type::assign(_M_data()[__len++], *__beg);</span></span>
<span id="L209"><span class="lineNum">     209</span> <span class="tlaGNC">        2935 :             ++__beg;</span></span>
<span id="L210"><span class="lineNum">     210</span>              :           }</span>
<span id="L211"><span class="lineNum">     211</span>              : </span>
<span id="L212"><span class="lineNum">     212</span> <span class="tlaGNC">           2 :         __guard._M_guarded = 0;</span></span>
<span id="L213"><span class="lineNum">     213</span>              : </span>
<span id="L214"><span class="lineNum">     214</span> <span class="tlaGNC">           2 :         _M_set_length(__len);</span></span>
<span id="L215"><span class="lineNum">     215</span> <span class="tlaGNC">           2 :       }</span></span>
<span id="L216"><span class="lineNum">     216</span>              : </span>
<span id="L217"><span class="lineNum">     217</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L218"><span class="lineNum">     218</span>              :     template&lt;typename _InIterator&gt;</span>
<span id="L219"><span class="lineNum">     219</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L220"><span class="lineNum">     220</span>              :       void</span>
<span id="L221"><span class="lineNum">     221</span> <span class="tlaGNC">         548 :       basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span></span>
<span id="L222"><span class="lineNum">     222</span>              :       _M_construct(_InIterator __beg, _InIterator __end,</span>
<span id="L223"><span class="lineNum">     223</span>              :                    std::forward_iterator_tag)</span>
<span id="L224"><span class="lineNum">     224</span>              :       {</span>
<span id="L225"><span class="lineNum">     225</span> <span class="tlaGNC">         548 :         size_type __dnew = static_cast&lt;size_type&gt;(std::distance(__beg, __end));</span></span>
<span id="L226"><span class="lineNum">     226</span>              : </span>
<span id="L227"><span class="lineNum">     227</span> <span class="tlaGNC">         548 :         if (__dnew &gt; size_type(_S_local_capacity))</span></span>
<span id="L228"><span class="lineNum">     228</span>              :           {</span>
<span id="L229"><span class="lineNum">     229</span> <span class="tlaGNC">         127 :             _M_data(_M_create(__dnew, size_type(0)));</span></span>
<span id="L230"><span class="lineNum">     230</span> <span class="tlaGNC">         127 :             _M_capacity(__dnew);</span></span>
<span id="L231"><span class="lineNum">     231</span>              :           }</span>
<span id="L232"><span class="lineNum">     232</span>              :         else</span>
<span id="L233"><span class="lineNum">     233</span>              :           _M_init_local_buf();</span>
<span id="L234"><span class="lineNum">     234</span>              : </span>
<span id="L235"><span class="lineNum">     235</span>              :         // Check for out_of_range and length_error exceptions.</span>
<span id="L236"><span class="lineNum">     236</span>              :         struct _Guard</span>
<span id="L237"><span class="lineNum">     237</span>              :         {</span>
<span id="L238"><span class="lineNum">     238</span>              :           _GLIBCXX20_CONSTEXPR</span>
<span id="L239"><span class="lineNum">     239</span> <span class="tlaGNC">         548 :           explicit _Guard(basic_string* __s) : _M_guarded(__s) { }</span></span>
<span id="L240"><span class="lineNum">     240</span>              : </span>
<span id="L241"><span class="lineNum">     241</span>              :           _GLIBCXX20_CONSTEXPR</span>
<span id="L242"><span class="lineNum">     242</span> <span class="tlaGNC">         548 :           ~_Guard() { if (_M_guarded) _M_guarded-&gt;_M_dispose(); }</span></span>
<span id="L243"><span class="lineNum">     243</span>              : </span>
<span id="L244"><span class="lineNum">     244</span>              :           basic_string* _M_guarded;</span>
<span id="L245"><span class="lineNum">     245</span> <span class="tlaGNC">         548 :         } __guard(this);</span></span>
<span id="L246"><span class="lineNum">     246</span>              : </span>
<span id="L247"><span class="lineNum">     247</span> <span class="tlaGNC">         548 :         this-&gt;_S_copy_chars(_M_data(), __beg, __end);</span></span>
<span id="L248"><span class="lineNum">     248</span>              : </span>
<span id="L249"><span class="lineNum">     249</span> <span class="tlaGNC">         548 :         __guard._M_guarded = 0;</span></span>
<span id="L250"><span class="lineNum">     250</span>              : </span>
<span id="L251"><span class="lineNum">     251</span> <span class="tlaGNC">         548 :         _M_set_length(__dnew);</span></span>
<span id="L252"><span class="lineNum">     252</span> <span class="tlaGNC">         548 :       }</span></span>
<span id="L253"><span class="lineNum">     253</span>              : </span>
<span id="L254"><span class="lineNum">     254</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L255"><span class="lineNum">     255</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L256"><span class="lineNum">     256</span>              :     void</span>
<span id="L257"><span class="lineNum">     257</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L258"><span class="lineNum">     258</span>              :     _M_construct(size_type __n, _CharT __c)</span>
<span id="L259"><span class="lineNum">     259</span>              :     {</span>
<span id="L260"><span class="lineNum">     260</span>              :       if (__n &gt; size_type(_S_local_capacity))</span>
<span id="L261"><span class="lineNum">     261</span>              :         {</span>
<span id="L262"><span class="lineNum">     262</span>              :           _M_data(_M_create(__n, size_type(0)));</span>
<span id="L263"><span class="lineNum">     263</span>              :           _M_capacity(__n);</span>
<span id="L264"><span class="lineNum">     264</span>              :         }</span>
<span id="L265"><span class="lineNum">     265</span>              :       else</span>
<span id="L266"><span class="lineNum">     266</span>              :         _M_init_local_buf();</span>
<span id="L267"><span class="lineNum">     267</span>              : </span>
<span id="L268"><span class="lineNum">     268</span>              :       if (__n)</span>
<span id="L269"><span class="lineNum">     269</span>              :         this-&gt;_S_assign(_M_data(), __n, __c);</span>
<span id="L270"><span class="lineNum">     270</span>              : </span>
<span id="L271"><span class="lineNum">     271</span>              :       _M_set_length(__n);</span>
<span id="L272"><span class="lineNum">     272</span>              :     }</span>
<span id="L273"><span class="lineNum">     273</span>              : </span>
<span id="L274"><span class="lineNum">     274</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L275"><span class="lineNum">     275</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L276"><span class="lineNum">     276</span>              :     void</span>
<span id="L277"><span class="lineNum">     277</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L278"><span class="lineNum">     278</span>              :     _M_assign(const basic_string&amp; __str)</span>
<span id="L279"><span class="lineNum">     279</span>              :     {</span>
<span id="L280"><span class="lineNum">     280</span>              :       if (this != std::__addressof(__str))</span>
<span id="L281"><span class="lineNum">     281</span>              :         {</span>
<span id="L282"><span class="lineNum">     282</span>              :           const size_type __rsize = __str.length();</span>
<span id="L283"><span class="lineNum">     283</span>              :           const size_type __capacity = capacity();</span>
<span id="L284"><span class="lineNum">     284</span>              : </span>
<span id="L285"><span class="lineNum">     285</span>              :           if (__rsize &gt; __capacity)</span>
<span id="L286"><span class="lineNum">     286</span>              :             {</span>
<span id="L287"><span class="lineNum">     287</span>              :               size_type __new_capacity = __rsize;</span>
<span id="L288"><span class="lineNum">     288</span>              :               pointer __tmp = _M_create(__new_capacity, __capacity);</span>
<span id="L289"><span class="lineNum">     289</span>              :               _M_dispose();</span>
<span id="L290"><span class="lineNum">     290</span>              :               _M_data(__tmp);</span>
<span id="L291"><span class="lineNum">     291</span>              :               _M_capacity(__new_capacity);</span>
<span id="L292"><span class="lineNum">     292</span>              :             }</span>
<span id="L293"><span class="lineNum">     293</span>              : </span>
<span id="L294"><span class="lineNum">     294</span>              :           if (__rsize)</span>
<span id="L295"><span class="lineNum">     295</span>              :             this-&gt;_S_copy(_M_data(), __str._M_data(), __rsize);</span>
<span id="L296"><span class="lineNum">     296</span>              : </span>
<span id="L297"><span class="lineNum">     297</span>              :           _M_set_length(__rsize);</span>
<span id="L298"><span class="lineNum">     298</span>              :         }</span>
<span id="L299"><span class="lineNum">     299</span>              :     }</span>
<span id="L300"><span class="lineNum">     300</span>              : </span>
<span id="L301"><span class="lineNum">     301</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L302"><span class="lineNum">     302</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L303"><span class="lineNum">     303</span>              :     void</span>
<span id="L304"><span class="lineNum">     304</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L305"><span class="lineNum">     305</span>              :     reserve(size_type __res)</span>
<span id="L306"><span class="lineNum">     306</span>              :     {</span>
<span id="L307"><span class="lineNum">     307</span>              :       const size_type __capacity = capacity();</span>
<span id="L308"><span class="lineNum">     308</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L309"><span class="lineNum">     309</span>              :       // 2968. Inconsistencies between basic_string reserve and</span>
<span id="L310"><span class="lineNum">     310</span>              :       // vector/unordered_map/unordered_set reserve functions</span>
<span id="L311"><span class="lineNum">     311</span>              :       // P0966 reserve should not shrink</span>
<span id="L312"><span class="lineNum">     312</span>              :       if (__res &lt;= __capacity)</span>
<span id="L313"><span class="lineNum">     313</span>              :         return;</span>
<span id="L314"><span class="lineNum">     314</span>              : </span>
<span id="L315"><span class="lineNum">     315</span>              :       pointer __tmp = _M_create(__res, __capacity);</span>
<span id="L316"><span class="lineNum">     316</span>              :       this-&gt;_S_copy(__tmp, _M_data(), length() + 1);</span>
<span id="L317"><span class="lineNum">     317</span>              :       _M_dispose();</span>
<span id="L318"><span class="lineNum">     318</span>              :       _M_data(__tmp);</span>
<span id="L319"><span class="lineNum">     319</span>              :       _M_capacity(__res);</span>
<span id="L320"><span class="lineNum">     320</span>              :     }</span>
<span id="L321"><span class="lineNum">     321</span>              : </span>
<span id="L322"><span class="lineNum">     322</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L323"><span class="lineNum">     323</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L324"><span class="lineNum">     324</span>              :     void</span>
<span id="L325"><span class="lineNum">     325</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L326"><span class="lineNum">     326</span>              :     _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,</span>
<span id="L327"><span class="lineNum">     327</span>              :               size_type __len2)</span>
<span id="L328"><span class="lineNum">     328</span>              :     {</span>
<span id="L329"><span class="lineNum">     329</span>              :       const size_type __how_much = length() - __pos - __len1;</span>
<span id="L330"><span class="lineNum">     330</span>              : </span>
<span id="L331"><span class="lineNum">     331</span>              :       size_type __new_capacity = length() + __len2 - __len1;</span>
<span id="L332"><span class="lineNum">     332</span>              :       pointer __r = _M_create(__new_capacity, capacity());</span>
<span id="L333"><span class="lineNum">     333</span>              : </span>
<span id="L334"><span class="lineNum">     334</span>              :       if (__pos)</span>
<span id="L335"><span class="lineNum">     335</span>              :         this-&gt;_S_copy(__r, _M_data(), __pos);</span>
<span id="L336"><span class="lineNum">     336</span>              :       if (__s &amp;&amp; __len2)</span>
<span id="L337"><span class="lineNum">     337</span>              :         this-&gt;_S_copy(__r + __pos, __s, __len2);</span>
<span id="L338"><span class="lineNum">     338</span>              :       if (__how_much)</span>
<span id="L339"><span class="lineNum">     339</span>              :         this-&gt;_S_copy(__r + __pos + __len2,</span>
<span id="L340"><span class="lineNum">     340</span>              :                       _M_data() + __pos + __len1, __how_much);</span>
<span id="L341"><span class="lineNum">     341</span>              : </span>
<span id="L342"><span class="lineNum">     342</span>              :       _M_dispose();</span>
<span id="L343"><span class="lineNum">     343</span>              :       _M_data(__r);</span>
<span id="L344"><span class="lineNum">     344</span>              :       _M_capacity(__new_capacity);</span>
<span id="L345"><span class="lineNum">     345</span>              :     }</span>
<span id="L346"><span class="lineNum">     346</span>              : </span>
<span id="L347"><span class="lineNum">     347</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L348"><span class="lineNum">     348</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L349"><span class="lineNum">     349</span>              :     void</span>
<span id="L350"><span class="lineNum">     350</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L351"><span class="lineNum">     351</span>              :     _M_erase(size_type __pos, size_type __n)</span>
<span id="L352"><span class="lineNum">     352</span>              :     {</span>
<span id="L353"><span class="lineNum">     353</span>              :       const size_type __how_much = length() - __pos - __n;</span>
<span id="L354"><span class="lineNum">     354</span>              : </span>
<span id="L355"><span class="lineNum">     355</span>              :       if (__how_much &amp;&amp; __n)</span>
<span id="L356"><span class="lineNum">     356</span>              :         this-&gt;_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much);</span>
<span id="L357"><span class="lineNum">     357</span>              : </span>
<span id="L358"><span class="lineNum">     358</span>              :       _M_set_length(length() - __n);</span>
<span id="L359"><span class="lineNum">     359</span>              :     }</span>
<span id="L360"><span class="lineNum">     360</span>              : </span>
<span id="L361"><span class="lineNum">     361</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L362"><span class="lineNum">     362</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L363"><span class="lineNum">     363</span>              :     void</span>
<span id="L364"><span class="lineNum">     364</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L365"><span class="lineNum">     365</span>              :     reserve()</span>
<span id="L366"><span class="lineNum">     366</span>              :     {</span>
<span id="L367"><span class="lineNum">     367</span>              :       if (_M_is_local())</span>
<span id="L368"><span class="lineNum">     368</span>              :         return;</span>
<span id="L369"><span class="lineNum">     369</span>              : </span>
<span id="L370"><span class="lineNum">     370</span>              :       const size_type __length = length();</span>
<span id="L371"><span class="lineNum">     371</span>              :       const size_type __capacity = _M_allocated_capacity;</span>
<span id="L372"><span class="lineNum">     372</span>              : </span>
<span id="L373"><span class="lineNum">     373</span>              :       if (__length &lt;= size_type(_S_local_capacity))</span>
<span id="L374"><span class="lineNum">     374</span>              :         {</span>
<span id="L375"><span class="lineNum">     375</span>              :           _M_init_local_buf();</span>
<span id="L376"><span class="lineNum">     376</span>              :           this-&gt;_S_copy(_M_local_buf, _M_data(), __length + 1);</span>
<span id="L377"><span class="lineNum">     377</span>              :           _M_destroy(__capacity);</span>
<span id="L378"><span class="lineNum">     378</span>              :           _M_data(_M_local_data());</span>
<span id="L379"><span class="lineNum">     379</span>              :         }</span>
<span id="L380"><span class="lineNum">     380</span>              : #if __cpp_exceptions</span>
<span id="L381"><span class="lineNum">     381</span>              :       else if (__length &lt; __capacity)</span>
<span id="L382"><span class="lineNum">     382</span>              :         try</span>
<span id="L383"><span class="lineNum">     383</span>              :           {</span>
<span id="L384"><span class="lineNum">     384</span>              :             pointer __tmp = _S_allocate(_M_get_allocator(), __length + 1);</span>
<span id="L385"><span class="lineNum">     385</span>              :             this-&gt;_S_copy(__tmp, _M_data(), __length + 1);</span>
<span id="L386"><span class="lineNum">     386</span>              :             _M_dispose();</span>
<span id="L387"><span class="lineNum">     387</span>              :             _M_data(__tmp);</span>
<span id="L388"><span class="lineNum">     388</span>              :             _M_capacity(__length);</span>
<span id="L389"><span class="lineNum">     389</span>              :           }</span>
<span id="L390"><span class="lineNum">     390</span>              :         catch (const __cxxabiv1::__forced_unwind&amp;)</span>
<span id="L391"><span class="lineNum">     391</span>              :           { throw; }</span>
<span id="L392"><span class="lineNum">     392</span>              :         catch (...)</span>
<span id="L393"><span class="lineNum">     393</span>              :           { /* swallow the exception */ }</span>
<span id="L394"><span class="lineNum">     394</span>              : #endif</span>
<span id="L395"><span class="lineNum">     395</span>              :     }</span>
<span id="L396"><span class="lineNum">     396</span>              : </span>
<span id="L397"><span class="lineNum">     397</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L398"><span class="lineNum">     398</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L399"><span class="lineNum">     399</span>              :     void</span>
<span id="L400"><span class="lineNum">     400</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L401"><span class="lineNum">     401</span>              :     resize(size_type __n, _CharT __c)</span>
<span id="L402"><span class="lineNum">     402</span>              :     {</span>
<span id="L403"><span class="lineNum">     403</span>              :       const size_type __size = this-&gt;size();</span>
<span id="L404"><span class="lineNum">     404</span>              :       if (__size &lt; __n)</span>
<span id="L405"><span class="lineNum">     405</span>              :         this-&gt;append(__n - __size, __c);</span>
<span id="L406"><span class="lineNum">     406</span>              :       else if (__n &lt; __size)</span>
<span id="L407"><span class="lineNum">     407</span>              :         this-&gt;_M_set_length(__n);</span>
<span id="L408"><span class="lineNum">     408</span>              :     }</span>
<span id="L409"><span class="lineNum">     409</span>              : </span>
<span id="L410"><span class="lineNum">     410</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L411"><span class="lineNum">     411</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L412"><span class="lineNum">     412</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;</span>
<span id="L413"><span class="lineNum">     413</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L414"><span class="lineNum">     414</span>              :     _M_append(const _CharT* __s, size_type __n)</span>
<span id="L415"><span class="lineNum">     415</span>              :     {</span>
<span id="L416"><span class="lineNum">     416</span>              :       const size_type __len = __n + this-&gt;size();</span>
<span id="L417"><span class="lineNum">     417</span>              : </span>
<span id="L418"><span class="lineNum">     418</span>              :       if (__len &lt;= this-&gt;capacity())</span>
<span id="L419"><span class="lineNum">     419</span>              :         {</span>
<span id="L420"><span class="lineNum">     420</span>              :           if (__n)</span>
<span id="L421"><span class="lineNum">     421</span>              :             this-&gt;_S_copy(this-&gt;_M_data() + this-&gt;size(), __s, __n);</span>
<span id="L422"><span class="lineNum">     422</span>              :         }</span>
<span id="L423"><span class="lineNum">     423</span>              :       else</span>
<span id="L424"><span class="lineNum">     424</span>              :         this-&gt;_M_mutate(this-&gt;size(), size_type(0), __s, __n);</span>
<span id="L425"><span class="lineNum">     425</span>              : </span>
<span id="L426"><span class="lineNum">     426</span>              :       this-&gt;_M_set_length(__len);</span>
<span id="L427"><span class="lineNum">     427</span>              :       return *this;</span>
<span id="L428"><span class="lineNum">     428</span>              :     }</span>
<span id="L429"><span class="lineNum">     429</span>              : </span>
<span id="L430"><span class="lineNum">     430</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L431"><span class="lineNum">     431</span>              :     template&lt;typename _InputIterator&gt;</span>
<span id="L432"><span class="lineNum">     432</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L433"><span class="lineNum">     433</span>              :       basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;</span>
<span id="L434"><span class="lineNum">     434</span>              :       basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L435"><span class="lineNum">     435</span>              :       _M_replace_dispatch(const_iterator __i1, const_iterator __i2,</span>
<span id="L436"><span class="lineNum">     436</span>              :                           _InputIterator __k1, _InputIterator __k2,</span>
<span id="L437"><span class="lineNum">     437</span>              :                           std::__false_type)</span>
<span id="L438"><span class="lineNum">     438</span>              :       {</span>
<span id="L439"><span class="lineNum">     439</span>              :         // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L440"><span class="lineNum">     440</span>              :         // 2788. unintentionally require a default constructible allocator</span>
<span id="L441"><span class="lineNum">     441</span>              :         const basic_string __s(__k1, __k2, this-&gt;get_allocator());</span>
<span id="L442"><span class="lineNum">     442</span>              :         const size_type __n1 = __i2 - __i1;</span>
<span id="L443"><span class="lineNum">     443</span>              :         return _M_replace(__i1 - begin(), __n1, __s._M_data(),</span>
<span id="L444"><span class="lineNum">     444</span>              :                           __s.size());</span>
<span id="L445"><span class="lineNum">     445</span>              :       }</span>
<span id="L446"><span class="lineNum">     446</span>              : </span>
<span id="L447"><span class="lineNum">     447</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L448"><span class="lineNum">     448</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L449"><span class="lineNum">     449</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;</span>
<span id="L450"><span class="lineNum">     450</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L451"><span class="lineNum">     451</span>              :     _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,</span>
<span id="L452"><span class="lineNum">     452</span>              :                    _CharT __c)</span>
<span id="L453"><span class="lineNum">     453</span>              :     {</span>
<span id="L454"><span class="lineNum">     454</span>              :       _M_check_length(__n1, __n2, &quot;basic_string::_M_replace_aux&quot;);</span>
<span id="L455"><span class="lineNum">     455</span>              : </span>
<span id="L456"><span class="lineNum">     456</span>              :       const size_type __old_size = this-&gt;size();</span>
<span id="L457"><span class="lineNum">     457</span>              :       const size_type __new_size = __old_size + __n2 - __n1;</span>
<span id="L458"><span class="lineNum">     458</span>              : </span>
<span id="L459"><span class="lineNum">     459</span>              :       if (__new_size &lt;= this-&gt;capacity())</span>
<span id="L460"><span class="lineNum">     460</span>              :         {</span>
<span id="L461"><span class="lineNum">     461</span>              :           pointer __p = this-&gt;_M_data() + __pos1;</span>
<span id="L462"><span class="lineNum">     462</span>              : </span>
<span id="L463"><span class="lineNum">     463</span>              :           const size_type __how_much = __old_size - __pos1 - __n1;</span>
<span id="L464"><span class="lineNum">     464</span>              :           if (__how_much &amp;&amp; __n1 != __n2)</span>
<span id="L465"><span class="lineNum">     465</span>              :             this-&gt;_S_move(__p + __n2, __p + __n1, __how_much);</span>
<span id="L466"><span class="lineNum">     466</span>              :         }</span>
<span id="L467"><span class="lineNum">     467</span>              :       else</span>
<span id="L468"><span class="lineNum">     468</span>              :         this-&gt;_M_mutate(__pos1, __n1, 0, __n2);</span>
<span id="L469"><span class="lineNum">     469</span>              : </span>
<span id="L470"><span class="lineNum">     470</span>              :       if (__n2)</span>
<span id="L471"><span class="lineNum">     471</span>              :         this-&gt;_S_assign(this-&gt;_M_data() + __pos1, __n2, __c);</span>
<span id="L472"><span class="lineNum">     472</span>              : </span>
<span id="L473"><span class="lineNum">     473</span>              :       this-&gt;_M_set_length(__new_size);</span>
<span id="L474"><span class="lineNum">     474</span>              :       return *this;</span>
<span id="L475"><span class="lineNum">     475</span>              :     }</span>
<span id="L476"><span class="lineNum">     476</span>              : </span>
<span id="L477"><span class="lineNum">     477</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L478"><span class="lineNum">     478</span>              :     __attribute__((__noinline__, __noclone__, __cold__)) void</span>
<span id="L479"><span class="lineNum">     479</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L480"><span class="lineNum">     480</span>              :     _M_replace_cold(pointer __p, size_type __len1, const _CharT* __s,</span>
<span id="L481"><span class="lineNum">     481</span>              :                     const size_type __len2, const size_type __how_much)</span>
<span id="L482"><span class="lineNum">     482</span>              :     {</span>
<span id="L483"><span class="lineNum">     483</span>              :       // Work in-place.</span>
<span id="L484"><span class="lineNum">     484</span>              :       if (__len2 &amp;&amp; __len2 &lt;= __len1)</span>
<span id="L485"><span class="lineNum">     485</span>              :         this-&gt;_S_move(__p, __s, __len2);</span>
<span id="L486"><span class="lineNum">     486</span>              :       if (__how_much &amp;&amp; __len1 != __len2)</span>
<span id="L487"><span class="lineNum">     487</span>              :         this-&gt;_S_move(__p + __len2, __p + __len1, __how_much);</span>
<span id="L488"><span class="lineNum">     488</span>              :       if (__len2 &gt; __len1)</span>
<span id="L489"><span class="lineNum">     489</span>              :         {</span>
<span id="L490"><span class="lineNum">     490</span>              :           if (__s + __len2 &lt;= __p + __len1)</span>
<span id="L491"><span class="lineNum">     491</span>              :             this-&gt;_S_move(__p, __s, __len2);</span>
<span id="L492"><span class="lineNum">     492</span>              :           else if (__s &gt;= __p + __len1)</span>
<span id="L493"><span class="lineNum">     493</span>              :             {</span>
<span id="L494"><span class="lineNum">     494</span>              :               // Hint to middle end that __p and __s overlap</span>
<span id="L495"><span class="lineNum">     495</span>              :               // (PR 98465).</span>
<span id="L496"><span class="lineNum">     496</span>              :               const size_type __poff = (__s - __p) + (__len2 - __len1);</span>
<span id="L497"><span class="lineNum">     497</span>              :               this-&gt;_S_copy(__p, __p + __poff, __len2);</span>
<span id="L498"><span class="lineNum">     498</span>              :             }</span>
<span id="L499"><span class="lineNum">     499</span>              :           else</span>
<span id="L500"><span class="lineNum">     500</span>              :             {</span>
<span id="L501"><span class="lineNum">     501</span>              :               const size_type __nleft = (__p + __len1) - __s;</span>
<span id="L502"><span class="lineNum">     502</span>              :               this-&gt;_S_move(__p, __s, __nleft);</span>
<span id="L503"><span class="lineNum">     503</span>              :               this-&gt;_S_copy(__p + __nleft, __p + __len2, __len2 - __nleft);</span>
<span id="L504"><span class="lineNum">     504</span>              :             }</span>
<span id="L505"><span class="lineNum">     505</span>              :         }</span>
<span id="L506"><span class="lineNum">     506</span>              :     }</span>
<span id="L507"><span class="lineNum">     507</span>              : </span>
<span id="L508"><span class="lineNum">     508</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L509"><span class="lineNum">     509</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L510"><span class="lineNum">     510</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;</span>
<span id="L511"><span class="lineNum">     511</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L512"><span class="lineNum">     512</span>              :     _M_replace(size_type __pos, size_type __len1, const _CharT* __s,</span>
<span id="L513"><span class="lineNum">     513</span>              :                const size_type __len2)</span>
<span id="L514"><span class="lineNum">     514</span>              :     {</span>
<span id="L515"><span class="lineNum">     515</span>              :       _M_check_length(__len1, __len2, &quot;basic_string::_M_replace&quot;);</span>
<span id="L516"><span class="lineNum">     516</span>              : </span>
<span id="L517"><span class="lineNum">     517</span>              :       const size_type __old_size = this-&gt;size();</span>
<span id="L518"><span class="lineNum">     518</span>              :       const size_type __new_size = __old_size + __len2 - __len1;</span>
<span id="L519"><span class="lineNum">     519</span>              : </span>
<span id="L520"><span class="lineNum">     520</span>              :       if (__new_size &lt;= this-&gt;capacity())</span>
<span id="L521"><span class="lineNum">     521</span>              :         {</span>
<span id="L522"><span class="lineNum">     522</span>              :           pointer __p = this-&gt;_M_data() + __pos;</span>
<span id="L523"><span class="lineNum">     523</span>              : </span>
<span id="L524"><span class="lineNum">     524</span>              :           const size_type __how_much = __old_size - __pos - __len1;</span>
<span id="L525"><span class="lineNum">     525</span>              : #if __cpp_lib_is_constant_evaluated</span>
<span id="L526"><span class="lineNum">     526</span>              :           if (std::is_constant_evaluated())</span>
<span id="L527"><span class="lineNum">     527</span>              :             {</span>
<span id="L528"><span class="lineNum">     528</span>              :               auto __newp = _S_allocate(_M_get_allocator(), __new_size);</span>
<span id="L529"><span class="lineNum">     529</span>              :               _S_copy(__newp, this-&gt;_M_data(), __pos);</span>
<span id="L530"><span class="lineNum">     530</span>              :               _S_copy(__newp + __pos, __s, __len2);</span>
<span id="L531"><span class="lineNum">     531</span>              :               _S_copy(__newp + __pos + __len2, __p + __len1, __how_much);</span>
<span id="L532"><span class="lineNum">     532</span>              :               _S_copy(this-&gt;_M_data(), __newp, __new_size);</span>
<span id="L533"><span class="lineNum">     533</span>              :               this-&gt;_M_get_allocator().deallocate(__newp, __new_size);</span>
<span id="L534"><span class="lineNum">     534</span>              :             }</span>
<span id="L535"><span class="lineNum">     535</span>              :           else</span>
<span id="L536"><span class="lineNum">     536</span>              : #endif</span>
<span id="L537"><span class="lineNum">     537</span>              :           if (__builtin_expect(_M_disjunct(__s), true))</span>
<span id="L538"><span class="lineNum">     538</span>              :             {</span>
<span id="L539"><span class="lineNum">     539</span>              :               if (__how_much &amp;&amp; __len1 != __len2)</span>
<span id="L540"><span class="lineNum">     540</span>              :                 this-&gt;_S_move(__p + __len2, __p + __len1, __how_much);</span>
<span id="L541"><span class="lineNum">     541</span>              :               if (__len2)</span>
<span id="L542"><span class="lineNum">     542</span>              :                 this-&gt;_S_copy(__p, __s, __len2);</span>
<span id="L543"><span class="lineNum">     543</span>              :             }</span>
<span id="L544"><span class="lineNum">     544</span>              :           else</span>
<span id="L545"><span class="lineNum">     545</span>              :             _M_replace_cold(__p, __len1, __s, __len2, __how_much);</span>
<span id="L546"><span class="lineNum">     546</span>              :         }</span>
<span id="L547"><span class="lineNum">     547</span>              :       else</span>
<span id="L548"><span class="lineNum">     548</span>              :         this-&gt;_M_mutate(__pos, __len1, __s, __len2);</span>
<span id="L549"><span class="lineNum">     549</span>              : </span>
<span id="L550"><span class="lineNum">     550</span>              :       this-&gt;_M_set_length(__new_size);</span>
<span id="L551"><span class="lineNum">     551</span>              :       return *this;</span>
<span id="L552"><span class="lineNum">     552</span>              :     }</span>
<span id="L553"><span class="lineNum">     553</span>              : </span>
<span id="L554"><span class="lineNum">     554</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L555"><span class="lineNum">     555</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L556"><span class="lineNum">     556</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L557"><span class="lineNum">     557</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L558"><span class="lineNum">     558</span>              :     copy(_CharT* __s, size_type __n, size_type __pos) const</span>
<span id="L559"><span class="lineNum">     559</span>              :     {</span>
<span id="L560"><span class="lineNum">     560</span>              :       _M_check(__pos, &quot;basic_string::copy&quot;);</span>
<span id="L561"><span class="lineNum">     561</span>              :       __n = _M_limit(__pos, __n);</span>
<span id="L562"><span class="lineNum">     562</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L563"><span class="lineNum">     563</span>              :       if (__n)</span>
<span id="L564"><span class="lineNum">     564</span>              :         _S_copy(__s, _M_data() + __pos, __n);</span>
<span id="L565"><span class="lineNum">     565</span>              :       // 21.3.5.7 par 3: do not append null.  (good.)</span>
<span id="L566"><span class="lineNum">     566</span>              :       return __n;</span>
<span id="L567"><span class="lineNum">     567</span>              :     }</span>
<span id="L568"><span class="lineNum">     568</span>              : </span>
<span id="L569"><span class="lineNum">     569</span>              : #if __cplusplus &gt; 202002L</span>
<span id="L570"><span class="lineNum">     570</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L571"><span class="lineNum">     571</span>              :   template&lt;typename _Operation&gt;</span>
<span id="L572"><span class="lineNum">     572</span>              :     constexpr void</span>
<span id="L573"><span class="lineNum">     573</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L574"><span class="lineNum">     574</span>              :     resize_and_overwrite(const size_type __n, _Operation __op)</span>
<span id="L575"><span class="lineNum">     575</span>              :     {</span>
<span id="L576"><span class="lineNum">     576</span>              :       const size_type __capacity = capacity();</span>
<span id="L577"><span class="lineNum">     577</span>              :       _CharT* __p;</span>
<span id="L578"><span class="lineNum">     578</span>              :       if (__n &gt; __capacity)</span>
<span id="L579"><span class="lineNum">     579</span>              :         {</span>
<span id="L580"><span class="lineNum">     580</span>              :           auto __new_capacity = __n; // Must not allow _M_create to modify __n.</span>
<span id="L581"><span class="lineNum">     581</span>              :           __p = _M_create(__new_capacity, __capacity);</span>
<span id="L582"><span class="lineNum">     582</span>              :           this-&gt;_S_copy(__p, _M_data(), length()); // exclude trailing null</span>
<span id="L583"><span class="lineNum">     583</span>              : #if __cpp_lib_is_constant_evaluated</span>
<span id="L584"><span class="lineNum">     584</span>              :           if (std::is_constant_evaluated())</span>
<span id="L585"><span class="lineNum">     585</span>              :             traits_type::assign(__p + length(), __n - length(), _CharT());</span>
<span id="L586"><span class="lineNum">     586</span>              : #endif</span>
<span id="L587"><span class="lineNum">     587</span>              :           _M_dispose();</span>
<span id="L588"><span class="lineNum">     588</span>              :           _M_data(__p);</span>
<span id="L589"><span class="lineNum">     589</span>              :           _M_capacity(__new_capacity);</span>
<span id="L590"><span class="lineNum">     590</span>              :         }</span>
<span id="L591"><span class="lineNum">     591</span>              :       else</span>
<span id="L592"><span class="lineNum">     592</span>              :         __p = _M_data();</span>
<span id="L593"><span class="lineNum">     593</span>              :       struct _Terminator {</span>
<span id="L594"><span class="lineNum">     594</span>              :         constexpr ~_Terminator() { _M_this-&gt;_M_set_length(_M_r); }</span>
<span id="L595"><span class="lineNum">     595</span>              :         basic_string* _M_this;</span>
<span id="L596"><span class="lineNum">     596</span>              :         size_type _M_r;</span>
<span id="L597"><span class="lineNum">     597</span>              :       };</span>
<span id="L598"><span class="lineNum">     598</span>              :       _Terminator __term{this};</span>
<span id="L599"><span class="lineNum">     599</span>              :       auto __r = std::move(__op)(auto(__p), auto(__n));</span>
<span id="L600"><span class="lineNum">     600</span>              :       static_assert(ranges::__detail::__is_integer_like&lt;decltype(__r)&gt;);</span>
<span id="L601"><span class="lineNum">     601</span>              :       _GLIBCXX_DEBUG_ASSERT(__r &gt;= 0 &amp;&amp; __r &lt;= __n);</span>
<span id="L602"><span class="lineNum">     602</span>              :       __term._M_r = size_type(__r);</span>
<span id="L603"><span class="lineNum">     603</span>              :       if (__term._M_r &gt; __n)</span>
<span id="L604"><span class="lineNum">     604</span>              :         __builtin_unreachable();</span>
<span id="L605"><span class="lineNum">     605</span>              :     }</span>
<span id="L606"><span class="lineNum">     606</span>              : #endif // C++23</span>
<span id="L607"><span class="lineNum">     607</span>              : </span>
<span id="L608"><span class="lineNum">     608</span>              : #endif  // _GLIBCXX_USE_CXX11_ABI</span>
<span id="L609"><span class="lineNum">     609</span>              :    </span>
<span id="L610"><span class="lineNum">     610</span>              : #if __cpp_lib_constexpr_string &gt;= 201907L</span>
<span id="L611"><span class="lineNum">     611</span>              : # define _GLIBCXX_STRING_CONSTEXPR constexpr</span>
<span id="L612"><span class="lineNum">     612</span>              : #else</span>
<span id="L613"><span class="lineNum">     613</span>              : # define _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L614"><span class="lineNum">     614</span>              : #endif</span>
<span id="L615"><span class="lineNum">     615</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L616"><span class="lineNum">     616</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L617"><span class="lineNum">     617</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L618"><span class="lineNum">     618</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L619"><span class="lineNum">     619</span>              :     find(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L620"><span class="lineNum">     620</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L621"><span class="lineNum">     621</span>              :     {</span>
<span id="L622"><span class="lineNum">     622</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L623"><span class="lineNum">     623</span>              :       const size_type __size = this-&gt;size();</span>
<span id="L624"><span class="lineNum">     624</span>              : </span>
<span id="L625"><span class="lineNum">     625</span>              :       if (__n == 0)</span>
<span id="L626"><span class="lineNum">     626</span>              :         return __pos &lt;= __size ? __pos : npos;</span>
<span id="L627"><span class="lineNum">     627</span>              :       if (__pos &gt;= __size)</span>
<span id="L628"><span class="lineNum">     628</span>              :         return npos;</span>
<span id="L629"><span class="lineNum">     629</span>              : </span>
<span id="L630"><span class="lineNum">     630</span>              :       const _CharT __elem0 = __s[0];</span>
<span id="L631"><span class="lineNum">     631</span>              :       const _CharT* const __data = data();</span>
<span id="L632"><span class="lineNum">     632</span>              :       const _CharT* __first = __data + __pos;</span>
<span id="L633"><span class="lineNum">     633</span>              :       const _CharT* const __last = __data + __size;</span>
<span id="L634"><span class="lineNum">     634</span>              :       size_type __len = __size - __pos;</span>
<span id="L635"><span class="lineNum">     635</span>              : </span>
<span id="L636"><span class="lineNum">     636</span>              :       while (__len &gt;= __n)</span>
<span id="L637"><span class="lineNum">     637</span>              :         {</span>
<span id="L638"><span class="lineNum">     638</span>              :           // Find the first occurrence of __elem0:</span>
<span id="L639"><span class="lineNum">     639</span>              :           __first = traits_type::find(__first, __len - __n + 1, __elem0);</span>
<span id="L640"><span class="lineNum">     640</span>              :           if (!__first)</span>
<span id="L641"><span class="lineNum">     641</span>              :             return npos;</span>
<span id="L642"><span class="lineNum">     642</span>              :           // Compare the full strings from the first occurrence of __elem0.</span>
<span id="L643"><span class="lineNum">     643</span>              :           // We already know that __first[0] == __s[0] but compare them again</span>
<span id="L644"><span class="lineNum">     644</span>              :           // anyway because __s is probably aligned, which helps memcmp.</span>
<span id="L645"><span class="lineNum">     645</span>              :           if (traits_type::compare(__first, __s, __n) == 0)</span>
<span id="L646"><span class="lineNum">     646</span>              :             return __first - __data;</span>
<span id="L647"><span class="lineNum">     647</span>              :           __len = __last - ++__first;</span>
<span id="L648"><span class="lineNum">     648</span>              :         }</span>
<span id="L649"><span class="lineNum">     649</span>              :       return npos;</span>
<span id="L650"><span class="lineNum">     650</span>              :     }</span>
<span id="L651"><span class="lineNum">     651</span>              : </span>
<span id="L652"><span class="lineNum">     652</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L653"><span class="lineNum">     653</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L654"><span class="lineNum">     654</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L655"><span class="lineNum">     655</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L656"><span class="lineNum">     656</span>              :     find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT</span>
<span id="L657"><span class="lineNum">     657</span>              :     {</span>
<span id="L658"><span class="lineNum">     658</span>              :       size_type __ret = npos;</span>
<span id="L659"><span class="lineNum">     659</span>              :       const size_type __size = this-&gt;size();</span>
<span id="L660"><span class="lineNum">     660</span>              :       if (__pos &lt; __size)</span>
<span id="L661"><span class="lineNum">     661</span>              :         {</span>
<span id="L662"><span class="lineNum">     662</span>              :           const _CharT* __data = _M_data();</span>
<span id="L663"><span class="lineNum">     663</span>              :           const size_type __n = __size - __pos;</span>
<span id="L664"><span class="lineNum">     664</span>              :           const _CharT* __p = traits_type::find(__data + __pos, __n, __c);</span>
<span id="L665"><span class="lineNum">     665</span>              :           if (__p)</span>
<span id="L666"><span class="lineNum">     666</span>              :             __ret = __p - __data;</span>
<span id="L667"><span class="lineNum">     667</span>              :         }</span>
<span id="L668"><span class="lineNum">     668</span>              :       return __ret;</span>
<span id="L669"><span class="lineNum">     669</span>              :     }</span>
<span id="L670"><span class="lineNum">     670</span>              : </span>
<span id="L671"><span class="lineNum">     671</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L672"><span class="lineNum">     672</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L673"><span class="lineNum">     673</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L674"><span class="lineNum">     674</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L675"><span class="lineNum">     675</span>              :     rfind(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L676"><span class="lineNum">     676</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L677"><span class="lineNum">     677</span>              :     {</span>
<span id="L678"><span class="lineNum">     678</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L679"><span class="lineNum">     679</span>              :       const size_type __size = this-&gt;size();</span>
<span id="L680"><span class="lineNum">     680</span>              :       if (__n &lt;= __size)</span>
<span id="L681"><span class="lineNum">     681</span>              :         {</span>
<span id="L682"><span class="lineNum">     682</span>              :           __pos = std::min(size_type(__size - __n), __pos);</span>
<span id="L683"><span class="lineNum">     683</span>              :           const _CharT* __data = _M_data();</span>
<span id="L684"><span class="lineNum">     684</span>              :           do</span>
<span id="L685"><span class="lineNum">     685</span>              :             {</span>
<span id="L686"><span class="lineNum">     686</span>              :               if (traits_type::compare(__data + __pos, __s, __n) == 0)</span>
<span id="L687"><span class="lineNum">     687</span>              :                 return __pos;</span>
<span id="L688"><span class="lineNum">     688</span>              :             }</span>
<span id="L689"><span class="lineNum">     689</span>              :           while (__pos-- &gt; 0);</span>
<span id="L690"><span class="lineNum">     690</span>              :         }</span>
<span id="L691"><span class="lineNum">     691</span>              :       return npos;</span>
<span id="L692"><span class="lineNum">     692</span>              :     }</span>
<span id="L693"><span class="lineNum">     693</span>              : </span>
<span id="L694"><span class="lineNum">     694</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L695"><span class="lineNum">     695</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L696"><span class="lineNum">     696</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L697"><span class="lineNum">     697</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L698"><span class="lineNum">     698</span>              :     rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT</span>
<span id="L699"><span class="lineNum">     699</span>              :     {</span>
<span id="L700"><span class="lineNum">     700</span>              :       size_type __size = this-&gt;size();</span>
<span id="L701"><span class="lineNum">     701</span>              :       if (__size)</span>
<span id="L702"><span class="lineNum">     702</span>              :         {</span>
<span id="L703"><span class="lineNum">     703</span>              :           if (--__size &gt; __pos)</span>
<span id="L704"><span class="lineNum">     704</span>              :             __size = __pos;</span>
<span id="L705"><span class="lineNum">     705</span>              :           for (++__size; __size-- &gt; 0; )</span>
<span id="L706"><span class="lineNum">     706</span>              :             if (traits_type::eq(_M_data()[__size], __c))</span>
<span id="L707"><span class="lineNum">     707</span>              :               return __size;</span>
<span id="L708"><span class="lineNum">     708</span>              :         }</span>
<span id="L709"><span class="lineNum">     709</span>              :       return npos;</span>
<span id="L710"><span class="lineNum">     710</span>              :     }</span>
<span id="L711"><span class="lineNum">     711</span>              : </span>
<span id="L712"><span class="lineNum">     712</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L713"><span class="lineNum">     713</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L714"><span class="lineNum">     714</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L715"><span class="lineNum">     715</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L716"><span class="lineNum">     716</span>              :     find_first_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L717"><span class="lineNum">     717</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L718"><span class="lineNum">     718</span>              :     {</span>
<span id="L719"><span class="lineNum">     719</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L720"><span class="lineNum">     720</span>              :       for (; __n &amp;&amp; __pos &lt; this-&gt;size(); ++__pos)</span>
<span id="L721"><span class="lineNum">     721</span>              :         {</span>
<span id="L722"><span class="lineNum">     722</span>              :           const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);</span>
<span id="L723"><span class="lineNum">     723</span>              :           if (__p)</span>
<span id="L724"><span class="lineNum">     724</span>              :             return __pos;</span>
<span id="L725"><span class="lineNum">     725</span>              :         }</span>
<span id="L726"><span class="lineNum">     726</span>              :       return npos;</span>
<span id="L727"><span class="lineNum">     727</span>              :     }</span>
<span id="L728"><span class="lineNum">     728</span>              : </span>
<span id="L729"><span class="lineNum">     729</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L730"><span class="lineNum">     730</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L731"><span class="lineNum">     731</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L732"><span class="lineNum">     732</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L733"><span class="lineNum">     733</span>              :     find_last_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L734"><span class="lineNum">     734</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L735"><span class="lineNum">     735</span>              :     {</span>
<span id="L736"><span class="lineNum">     736</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L737"><span class="lineNum">     737</span>              :       size_type __size = this-&gt;size();</span>
<span id="L738"><span class="lineNum">     738</span>              :       if (__size &amp;&amp; __n)</span>
<span id="L739"><span class="lineNum">     739</span>              :         {</span>
<span id="L740"><span class="lineNum">     740</span>              :           if (--__size &gt; __pos)</span>
<span id="L741"><span class="lineNum">     741</span>              :             __size = __pos;</span>
<span id="L742"><span class="lineNum">     742</span>              :           do</span>
<span id="L743"><span class="lineNum">     743</span>              :             {</span>
<span id="L744"><span class="lineNum">     744</span>              :               if (traits_type::find(__s, __n, _M_data()[__size]))</span>
<span id="L745"><span class="lineNum">     745</span>              :                 return __size;</span>
<span id="L746"><span class="lineNum">     746</span>              :             }</span>
<span id="L747"><span class="lineNum">     747</span>              :           while (__size-- != 0);</span>
<span id="L748"><span class="lineNum">     748</span>              :         }</span>
<span id="L749"><span class="lineNum">     749</span>              :       return npos;</span>
<span id="L750"><span class="lineNum">     750</span>              :     }</span>
<span id="L751"><span class="lineNum">     751</span>              : </span>
<span id="L752"><span class="lineNum">     752</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L753"><span class="lineNum">     753</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L754"><span class="lineNum">     754</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L755"><span class="lineNum">     755</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L756"><span class="lineNum">     756</span>              :     find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L757"><span class="lineNum">     757</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L758"><span class="lineNum">     758</span>              :     {</span>
<span id="L759"><span class="lineNum">     759</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L760"><span class="lineNum">     760</span>              :       for (; __pos &lt; this-&gt;size(); ++__pos)</span>
<span id="L761"><span class="lineNum">     761</span>              :         if (!traits_type::find(__s, __n, _M_data()[__pos]))</span>
<span id="L762"><span class="lineNum">     762</span>              :           return __pos;</span>
<span id="L763"><span class="lineNum">     763</span>              :       return npos;</span>
<span id="L764"><span class="lineNum">     764</span>              :     }</span>
<span id="L765"><span class="lineNum">     765</span>              : </span>
<span id="L766"><span class="lineNum">     766</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L767"><span class="lineNum">     767</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L768"><span class="lineNum">     768</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L769"><span class="lineNum">     769</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L770"><span class="lineNum">     770</span>              :     find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT</span>
<span id="L771"><span class="lineNum">     771</span>              :     {</span>
<span id="L772"><span class="lineNum">     772</span>              :       for (; __pos &lt; this-&gt;size(); ++__pos)</span>
<span id="L773"><span class="lineNum">     773</span>              :         if (!traits_type::eq(_M_data()[__pos], __c))</span>
<span id="L774"><span class="lineNum">     774</span>              :           return __pos;</span>
<span id="L775"><span class="lineNum">     775</span>              :       return npos;</span>
<span id="L776"><span class="lineNum">     776</span>              :     }</span>
<span id="L777"><span class="lineNum">     777</span>              : </span>
<span id="L778"><span class="lineNum">     778</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L779"><span class="lineNum">     779</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L780"><span class="lineNum">     780</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L781"><span class="lineNum">     781</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L782"><span class="lineNum">     782</span>              :     find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L783"><span class="lineNum">     783</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L784"><span class="lineNum">     784</span>              :     {</span>
<span id="L785"><span class="lineNum">     785</span>              :       __glibcxx_requires_string_len(__s, __n);</span>
<span id="L786"><span class="lineNum">     786</span>              :       size_type __size = this-&gt;size();</span>
<span id="L787"><span class="lineNum">     787</span>              :       if (__size)</span>
<span id="L788"><span class="lineNum">     788</span>              :         {</span>
<span id="L789"><span class="lineNum">     789</span>              :           if (--__size &gt; __pos)</span>
<span id="L790"><span class="lineNum">     790</span>              :             __size = __pos;</span>
<span id="L791"><span class="lineNum">     791</span>              :           do</span>
<span id="L792"><span class="lineNum">     792</span>              :             {</span>
<span id="L793"><span class="lineNum">     793</span>              :               if (!traits_type::find(__s, __n, _M_data()[__size]))</span>
<span id="L794"><span class="lineNum">     794</span>              :                 return __size;</span>
<span id="L795"><span class="lineNum">     795</span>              :             }</span>
<span id="L796"><span class="lineNum">     796</span>              :           while (__size--);</span>
<span id="L797"><span class="lineNum">     797</span>              :         }</span>
<span id="L798"><span class="lineNum">     798</span>              :       return npos;</span>
<span id="L799"><span class="lineNum">     799</span>              :     }</span>
<span id="L800"><span class="lineNum">     800</span>              : </span>
<span id="L801"><span class="lineNum">     801</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L802"><span class="lineNum">     802</span>              :     _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L803"><span class="lineNum">     803</span>              :     typename basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type</span>
<span id="L804"><span class="lineNum">     804</span>              :     basic_string&lt;_CharT, _Traits, _Alloc&gt;::</span>
<span id="L805"><span class="lineNum">     805</span>              :     find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT</span>
<span id="L806"><span class="lineNum">     806</span>              :     {</span>
<span id="L807"><span class="lineNum">     807</span>              :       size_type __size = this-&gt;size();</span>
<span id="L808"><span class="lineNum">     808</span>              :       if (__size)</span>
<span id="L809"><span class="lineNum">     809</span>              :         {</span>
<span id="L810"><span class="lineNum">     810</span>              :           if (--__size &gt; __pos)</span>
<span id="L811"><span class="lineNum">     811</span>              :             __size = __pos;</span>
<span id="L812"><span class="lineNum">     812</span>              :           do</span>
<span id="L813"><span class="lineNum">     813</span>              :             {</span>
<span id="L814"><span class="lineNum">     814</span>              :               if (!traits_type::eq(_M_data()[__size], __c))</span>
<span id="L815"><span class="lineNum">     815</span>              :                 return __size;</span>
<span id="L816"><span class="lineNum">     816</span>              :             }</span>
<span id="L817"><span class="lineNum">     817</span>              :           while (__size--);</span>
<span id="L818"><span class="lineNum">     818</span>              :         }</span>
<span id="L819"><span class="lineNum">     819</span>              :       return npos;</span>
<span id="L820"><span class="lineNum">     820</span>              :     }</span>
<span id="L821"><span class="lineNum">     821</span>              : </span>
<span id="L822"><span class="lineNum">     822</span>              : #undef _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L823"><span class="lineNum">     823</span>              : </span>
<span id="L824"><span class="lineNum">     824</span>              :   // 21.3.7.9 basic_string::getline and operators</span>
<span id="L825"><span class="lineNum">     825</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L826"><span class="lineNum">     826</span>              :     basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L827"><span class="lineNum">     827</span>              :     operator&gt;&gt;(basic_istream&lt;_CharT, _Traits&gt;&amp; __in,</span>
<span id="L828"><span class="lineNum">     828</span>              :                basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str)</span>
<span id="L829"><span class="lineNum">     829</span>              :     {</span>
<span id="L830"><span class="lineNum">     830</span>              :       typedef basic_istream&lt;_CharT, _Traits&gt;              __istream_type;</span>
<span id="L831"><span class="lineNum">     831</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt;       __string_type;</span>
<span id="L832"><span class="lineNum">     832</span>              :       typedef typename __istream_type::ios_base         __ios_base;</span>
<span id="L833"><span class="lineNum">     833</span>              :       typedef typename __istream_type::int_type         __int_type;</span>
<span id="L834"><span class="lineNum">     834</span>              :       typedef typename __string_type::size_type         __size_type;</span>
<span id="L835"><span class="lineNum">     835</span>              :       typedef ctype&lt;_CharT&gt;                               __ctype_type;</span>
<span id="L836"><span class="lineNum">     836</span>              :       typedef typename __ctype_type::ctype_base         __ctype_base;</span>
<span id="L837"><span class="lineNum">     837</span>              : </span>
<span id="L838"><span class="lineNum">     838</span>              :       __size_type __extracted = 0;</span>
<span id="L839"><span class="lineNum">     839</span>              :       typename __ios_base::iostate __err = __ios_base::goodbit;</span>
<span id="L840"><span class="lineNum">     840</span>              :       typename __istream_type::sentry __cerb(__in, false);</span>
<span id="L841"><span class="lineNum">     841</span>              :       if (__cerb)</span>
<span id="L842"><span class="lineNum">     842</span>              :         {</span>
<span id="L843"><span class="lineNum">     843</span>              :           __try</span>
<span id="L844"><span class="lineNum">     844</span>              :             {</span>
<span id="L845"><span class="lineNum">     845</span>              :               // Avoid reallocation for common case.</span>
<span id="L846"><span class="lineNum">     846</span>              :               __str.erase();</span>
<span id="L847"><span class="lineNum">     847</span>              :               _CharT __buf[128];</span>
<span id="L848"><span class="lineNum">     848</span>              :               __size_type __len = 0;          </span>
<span id="L849"><span class="lineNum">     849</span>              :               const streamsize __w = __in.width();</span>
<span id="L850"><span class="lineNum">     850</span>              :               const __size_type __n = __w &gt; 0 ? static_cast&lt;__size_type&gt;(__w)</span>
<span id="L851"><span class="lineNum">     851</span>              :                                               : __str.max_size();</span>
<span id="L852"><span class="lineNum">     852</span>              :               const __ctype_type&amp; __ct = use_facet&lt;__ctype_type&gt;(__in.getloc());</span>
<span id="L853"><span class="lineNum">     853</span>              :               const __int_type __eof = _Traits::eof();</span>
<span id="L854"><span class="lineNum">     854</span>              :               __int_type __c = __in.rdbuf()-&gt;sgetc();</span>
<span id="L855"><span class="lineNum">     855</span>              : </span>
<span id="L856"><span class="lineNum">     856</span>              :               while (__extracted &lt; __n</span>
<span id="L857"><span class="lineNum">     857</span>              :                      &amp;&amp; !_Traits::eq_int_type(__c, __eof)</span>
<span id="L858"><span class="lineNum">     858</span>              :                      &amp;&amp; !__ct.is(__ctype_base::space,</span>
<span id="L859"><span class="lineNum">     859</span>              :                                  _Traits::to_char_type(__c)))</span>
<span id="L860"><span class="lineNum">     860</span>              :                 {</span>
<span id="L861"><span class="lineNum">     861</span>              :                   if (__len == sizeof(__buf) / sizeof(_CharT))</span>
<span id="L862"><span class="lineNum">     862</span>              :                     {</span>
<span id="L863"><span class="lineNum">     863</span>              :                       __str.append(__buf, sizeof(__buf) / sizeof(_CharT));</span>
<span id="L864"><span class="lineNum">     864</span>              :                       __len = 0;</span>
<span id="L865"><span class="lineNum">     865</span>              :                     }</span>
<span id="L866"><span class="lineNum">     866</span>              :                   __buf[__len++] = _Traits::to_char_type(__c);</span>
<span id="L867"><span class="lineNum">     867</span>              :                   ++__extracted;</span>
<span id="L868"><span class="lineNum">     868</span>              :                   __c = __in.rdbuf()-&gt;snextc();</span>
<span id="L869"><span class="lineNum">     869</span>              :                 }</span>
<span id="L870"><span class="lineNum">     870</span>              :               __str.append(__buf, __len);</span>
<span id="L871"><span class="lineNum">     871</span>              : </span>
<span id="L872"><span class="lineNum">     872</span>              :               if (__extracted &lt; __n &amp;&amp; _Traits::eq_int_type(__c, __eof))</span>
<span id="L873"><span class="lineNum">     873</span>              :                 __err |= __ios_base::eofbit;</span>
<span id="L874"><span class="lineNum">     874</span>              :               __in.width(0);</span>
<span id="L875"><span class="lineNum">     875</span>              :             }</span>
<span id="L876"><span class="lineNum">     876</span>              :           __catch(__cxxabiv1::__forced_unwind&amp;)</span>
<span id="L877"><span class="lineNum">     877</span>              :             {</span>
<span id="L878"><span class="lineNum">     878</span>              :               __in._M_setstate(__ios_base::badbit);</span>
<span id="L879"><span class="lineNum">     879</span>              :               __throw_exception_again;</span>
<span id="L880"><span class="lineNum">     880</span>              :             }</span>
<span id="L881"><span class="lineNum">     881</span>              :           __catch(...)</span>
<span id="L882"><span class="lineNum">     882</span>              :             {</span>
<span id="L883"><span class="lineNum">     883</span>              :               // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L884"><span class="lineNum">     884</span>              :               // 91. Description of operator&gt;&gt; and getline() for string&lt;&gt;</span>
<span id="L885"><span class="lineNum">     885</span>              :               // might cause endless loop</span>
<span id="L886"><span class="lineNum">     886</span>              :               __in._M_setstate(__ios_base::badbit);</span>
<span id="L887"><span class="lineNum">     887</span>              :             }</span>
<span id="L888"><span class="lineNum">     888</span>              :         }</span>
<span id="L889"><span class="lineNum">     889</span>              :       // 211.  operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</span>
<span id="L890"><span class="lineNum">     890</span>              :       if (!__extracted)</span>
<span id="L891"><span class="lineNum">     891</span>              :         __err |= __ios_base::failbit;</span>
<span id="L892"><span class="lineNum">     892</span>              :       if (__err)</span>
<span id="L893"><span class="lineNum">     893</span>              :         __in.setstate(__err);</span>
<span id="L894"><span class="lineNum">     894</span>              :       return __in;</span>
<span id="L895"><span class="lineNum">     895</span>              :     }</span>
<span id="L896"><span class="lineNum">     896</span>              : </span>
<span id="L897"><span class="lineNum">     897</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L898"><span class="lineNum">     898</span>              :     basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L899"><span class="lineNum">     899</span>              :     getline(basic_istream&lt;_CharT, _Traits&gt;&amp; __in,</span>
<span id="L900"><span class="lineNum">     900</span>              :             basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str, _CharT __delim)</span>
<span id="L901"><span class="lineNum">     901</span>              :     {</span>
<span id="L902"><span class="lineNum">     902</span>              :       typedef basic_istream&lt;_CharT, _Traits&gt;              __istream_type;</span>
<span id="L903"><span class="lineNum">     903</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt;       __string_type;</span>
<span id="L904"><span class="lineNum">     904</span>              :       typedef typename __istream_type::ios_base         __ios_base;</span>
<span id="L905"><span class="lineNum">     905</span>              :       typedef typename __istream_type::int_type         __int_type;</span>
<span id="L906"><span class="lineNum">     906</span>              :       typedef typename __string_type::size_type         __size_type;</span>
<span id="L907"><span class="lineNum">     907</span>              : </span>
<span id="L908"><span class="lineNum">     908</span>              :       __size_type __extracted = 0;</span>
<span id="L909"><span class="lineNum">     909</span>              :       const __size_type __n = __str.max_size();</span>
<span id="L910"><span class="lineNum">     910</span>              :       typename __ios_base::iostate __err = __ios_base::goodbit;</span>
<span id="L911"><span class="lineNum">     911</span>              :       typename __istream_type::sentry __cerb(__in, true);</span>
<span id="L912"><span class="lineNum">     912</span>              :       if (__cerb)</span>
<span id="L913"><span class="lineNum">     913</span>              :         {</span>
<span id="L914"><span class="lineNum">     914</span>              :           __try</span>
<span id="L915"><span class="lineNum">     915</span>              :             {</span>
<span id="L916"><span class="lineNum">     916</span>              :               __str.erase();</span>
<span id="L917"><span class="lineNum">     917</span>              :               const __int_type __idelim = _Traits::to_int_type(__delim);</span>
<span id="L918"><span class="lineNum">     918</span>              :               const __int_type __eof = _Traits::eof();</span>
<span id="L919"><span class="lineNum">     919</span>              :               __int_type __c = __in.rdbuf()-&gt;sgetc();</span>
<span id="L920"><span class="lineNum">     920</span>              : </span>
<span id="L921"><span class="lineNum">     921</span>              :               while (__extracted &lt; __n</span>
<span id="L922"><span class="lineNum">     922</span>              :                      &amp;&amp; !_Traits::eq_int_type(__c, __eof)</span>
<span id="L923"><span class="lineNum">     923</span>              :                      &amp;&amp; !_Traits::eq_int_type(__c, __idelim))</span>
<span id="L924"><span class="lineNum">     924</span>              :                 {</span>
<span id="L925"><span class="lineNum">     925</span>              :                   __str += _Traits::to_char_type(__c);</span>
<span id="L926"><span class="lineNum">     926</span>              :                   ++__extracted;</span>
<span id="L927"><span class="lineNum">     927</span>              :                   __c = __in.rdbuf()-&gt;snextc();</span>
<span id="L928"><span class="lineNum">     928</span>              :                 }</span>
<span id="L929"><span class="lineNum">     929</span>              : </span>
<span id="L930"><span class="lineNum">     930</span>              :               if (_Traits::eq_int_type(__c, __eof))</span>
<span id="L931"><span class="lineNum">     931</span>              :                 __err |= __ios_base::eofbit;</span>
<span id="L932"><span class="lineNum">     932</span>              :               else if (_Traits::eq_int_type(__c, __idelim))</span>
<span id="L933"><span class="lineNum">     933</span>              :                 {</span>
<span id="L934"><span class="lineNum">     934</span>              :                   ++__extracted;                  </span>
<span id="L935"><span class="lineNum">     935</span>              :                   __in.rdbuf()-&gt;sbumpc();</span>
<span id="L936"><span class="lineNum">     936</span>              :                 }</span>
<span id="L937"><span class="lineNum">     937</span>              :               else</span>
<span id="L938"><span class="lineNum">     938</span>              :                 __err |= __ios_base::failbit;</span>
<span id="L939"><span class="lineNum">     939</span>              :             }</span>
<span id="L940"><span class="lineNum">     940</span>              :           __catch(__cxxabiv1::__forced_unwind&amp;)</span>
<span id="L941"><span class="lineNum">     941</span>              :             {</span>
<span id="L942"><span class="lineNum">     942</span>              :               __in._M_setstate(__ios_base::badbit);</span>
<span id="L943"><span class="lineNum">     943</span>              :               __throw_exception_again;</span>
<span id="L944"><span class="lineNum">     944</span>              :             }</span>
<span id="L945"><span class="lineNum">     945</span>              :           __catch(...)</span>
<span id="L946"><span class="lineNum">     946</span>              :             {</span>
<span id="L947"><span class="lineNum">     947</span>              :               // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L948"><span class="lineNum">     948</span>              :               // 91. Description of operator&gt;&gt; and getline() for string&lt;&gt;</span>
<span id="L949"><span class="lineNum">     949</span>              :               // might cause endless loop</span>
<span id="L950"><span class="lineNum">     950</span>              :               __in._M_setstate(__ios_base::badbit);</span>
<span id="L951"><span class="lineNum">     951</span>              :             }</span>
<span id="L952"><span class="lineNum">     952</span>              :         }</span>
<span id="L953"><span class="lineNum">     953</span>              :       if (!__extracted)</span>
<span id="L954"><span class="lineNum">     954</span>              :         __err |= __ios_base::failbit;</span>
<span id="L955"><span class="lineNum">     955</span>              :       if (__err)</span>
<span id="L956"><span class="lineNum">     956</span>              :         __in.setstate(__err);</span>
<span id="L957"><span class="lineNum">     957</span>              :       return __in;</span>
<span id="L958"><span class="lineNum">     958</span>              :     }</span>
<span id="L959"><span class="lineNum">     959</span>              : </span>
<span id="L960"><span class="lineNum">     960</span>              :   // Inhibit implicit instantiations for required instantiations,</span>
<span id="L961"><span class="lineNum">     961</span>              :   // which are defined via explicit instantiations elsewhere.</span>
<span id="L962"><span class="lineNum">     962</span>              : #if _GLIBCXX_EXTERN_TEMPLATE</span>
<span id="L963"><span class="lineNum">     963</span>              :   // The explicit instantiation definitions in src/c++11/string-inst.cc and</span>
<span id="L964"><span class="lineNum">     964</span>              :   // src/c++17/string-inst.cc only instantiate the members required for C++17</span>
<span id="L965"><span class="lineNum">     965</span>              :   // and earlier standards (so not C++20's starts_with and ends_with).</span>
<span id="L966"><span class="lineNum">     966</span>              :   // Suppress the explicit instantiation declarations for C++20, so C++20</span>
<span id="L967"><span class="lineNum">     967</span>              :   // code will implicitly instantiate std::string and std::wstring as needed.</span>
<span id="L968"><span class="lineNum">     968</span>              : # if __cplusplus &lt;= 201703L &amp;&amp; _GLIBCXX_EXTERN_TEMPLATE &gt; 0</span>
<span id="L969"><span class="lineNum">     969</span>              :   extern template class basic_string&lt;char&gt;;</span>
<span id="L970"><span class="lineNum">     970</span>              : # elif ! _GLIBCXX_USE_CXX11_ABI</span>
<span id="L971"><span class="lineNum">     971</span>              :   // Still need to prevent implicit instantiation of the COW empty rep,</span>
<span id="L972"><span class="lineNum">     972</span>              :   // to ensure the definition in libstdc++.so is unique (PR 86138).</span>
<span id="L973"><span class="lineNum">     973</span>              :   extern template basic_string&lt;char&gt;::size_type</span>
<span id="L974"><span class="lineNum">     974</span>              :     basic_string&lt;char&gt;::_Rep::_S_empty_rep_storage[];</span>
<span id="L975"><span class="lineNum">     975</span>              : # elif _GLIBCXX_EXTERN_TEMPLATE &gt; 0</span>
<span id="L976"><span class="lineNum">     976</span>              :   // Export _M_replace_cold even for C++20.</span>
<span id="L977"><span class="lineNum">     977</span>              :   extern template void</span>
<span id="L978"><span class="lineNum">     978</span>              :     basic_string&lt;char&gt;::_M_replace_cold(char *, size_type, const char*,</span>
<span id="L979"><span class="lineNum">     979</span>              :                                         const size_type, const size_type);</span>
<span id="L980"><span class="lineNum">     980</span>              : # endif</span>
<span id="L981"><span class="lineNum">     981</span>              : </span>
<span id="L982"><span class="lineNum">     982</span>              :   extern template</span>
<span id="L983"><span class="lineNum">     983</span>              :     basic_istream&lt;char&gt;&amp;</span>
<span id="L984"><span class="lineNum">     984</span>              :     operator&gt;&gt;(basic_istream&lt;char&gt;&amp;, string&amp;);</span>
<span id="L985"><span class="lineNum">     985</span>              :   extern template</span>
<span id="L986"><span class="lineNum">     986</span>              :     basic_ostream&lt;char&gt;&amp;</span>
<span id="L987"><span class="lineNum">     987</span>              :     operator&lt;&lt;(basic_ostream&lt;char&gt;&amp;, const string&amp;);</span>
<span id="L988"><span class="lineNum">     988</span>              :   extern template</span>
<span id="L989"><span class="lineNum">     989</span>              :     basic_istream&lt;char&gt;&amp;</span>
<span id="L990"><span class="lineNum">     990</span>              :     getline(basic_istream&lt;char&gt;&amp;, string&amp;, char);</span>
<span id="L991"><span class="lineNum">     991</span>              :   extern template</span>
<span id="L992"><span class="lineNum">     992</span>              :     basic_istream&lt;char&gt;&amp;</span>
<span id="L993"><span class="lineNum">     993</span>              :     getline(basic_istream&lt;char&gt;&amp;, string&amp;);</span>
<span id="L994"><span class="lineNum">     994</span>              : </span>
<span id="L995"><span class="lineNum">     995</span>              : #ifdef _GLIBCXX_USE_WCHAR_T</span>
<span id="L996"><span class="lineNum">     996</span>              : # if __cplusplus &lt;= 201703L &amp;&amp; _GLIBCXX_EXTERN_TEMPLATE &gt; 0</span>
<span id="L997"><span class="lineNum">     997</span>              :   extern template class basic_string&lt;wchar_t&gt;;</span>
<span id="L998"><span class="lineNum">     998</span>              : # elif ! _GLIBCXX_USE_CXX11_ABI</span>
<span id="L999"><span class="lineNum">     999</span>              :   extern template basic_string&lt;wchar_t&gt;::size_type</span>
<span id="L1000"><span class="lineNum">    1000</span>              :     basic_string&lt;wchar_t&gt;::_Rep::_S_empty_rep_storage[];</span>
<span id="L1001"><span class="lineNum">    1001</span>              : # elif _GLIBCXX_EXTERN_TEMPLATE &gt; 0</span>
<span id="L1002"><span class="lineNum">    1002</span>              :   // Export _M_replace_cold even for C++20.</span>
<span id="L1003"><span class="lineNum">    1003</span>              :   extern template void</span>
<span id="L1004"><span class="lineNum">    1004</span>              :     basic_string&lt;wchar_t&gt;::_M_replace_cold(wchar_t*, size_type, const wchar_t*,</span>
<span id="L1005"><span class="lineNum">    1005</span>              :                                            const size_type, const size_type);</span>
<span id="L1006"><span class="lineNum">    1006</span>              : # endif</span>
<span id="L1007"><span class="lineNum">    1007</span>              : </span>
<span id="L1008"><span class="lineNum">    1008</span>              :   extern template</span>
<span id="L1009"><span class="lineNum">    1009</span>              :     basic_istream&lt;wchar_t&gt;&amp;</span>
<span id="L1010"><span class="lineNum">    1010</span>              :     operator&gt;&gt;(basic_istream&lt;wchar_t&gt;&amp;, wstring&amp;);</span>
<span id="L1011"><span class="lineNum">    1011</span>              :   extern template</span>
<span id="L1012"><span class="lineNum">    1012</span>              :     basic_ostream&lt;wchar_t&gt;&amp;</span>
<span id="L1013"><span class="lineNum">    1013</span>              :     operator&lt;&lt;(basic_ostream&lt;wchar_t&gt;&amp;, const wstring&amp;);</span>
<span id="L1014"><span class="lineNum">    1014</span>              :   extern template</span>
<span id="L1015"><span class="lineNum">    1015</span>              :     basic_istream&lt;wchar_t&gt;&amp;</span>
<span id="L1016"><span class="lineNum">    1016</span>              :     getline(basic_istream&lt;wchar_t&gt;&amp;, wstring&amp;, wchar_t);</span>
<span id="L1017"><span class="lineNum">    1017</span>              :   extern template</span>
<span id="L1018"><span class="lineNum">    1018</span>              :     basic_istream&lt;wchar_t&gt;&amp;</span>
<span id="L1019"><span class="lineNum">    1019</span>              :     getline(basic_istream&lt;wchar_t&gt;&amp;, wstring&amp;);</span>
<span id="L1020"><span class="lineNum">    1020</span>              : #endif // _GLIBCXX_USE_WCHAR_T</span>
<span id="L1021"><span class="lineNum">    1021</span>              : #endif // _GLIBCXX_EXTERN_TEMPLATE</span>
<span id="L1022"><span class="lineNum">    1022</span>              : </span>
<span id="L1023"><span class="lineNum">    1023</span>              : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L1024"><span class="lineNum">    1024</span>              : } // namespace std</span>
<span id="L1025"><span class="lineNum">    1025</span>              : </span>
<span id="L1026"><span class="lineNum">    1026</span>              : #endif</span>
        </pre>
              </td>
            </tr>
          </table>
          <br>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
            <tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
          </table>
          <br>

</body>
</html>
